/**
 * 
 */
package ro.dta.idbi.model.dynamicpattern;

import java.util.Map;

/**
 * Class to represent a pair of integers
 * 
 * @author Tudor Dobrila
 * 
 */
class IntPair implements Map.Entry<Integer, Integer> {

	/**
	 * First element in the pair
	 */
	private Integer x;

	/**
	 * Second element in the pair
	 */
	private Integer y;

	/**
	 * Integer pair class constructor
	 * 
	 * @param x
	 *            First element in the pair
	 * @param y
	 *            Second element in the pair
	 */
	public IntPair(Integer x, Integer y) {
		this.x = x;
		this.y = y;
	}

	@Override
	public Integer getKey() {
		return x;
	}

	@Override
	public Integer getValue() {
		return y;
	}

	@Override
	public Integer setValue(Integer value) {
		y = value;
		return y;
	}

}
